package cn.school.demo.ui.read

import androidx.lifecycle.ViewModelProvider
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import cn.school.demo.MyApplication
import cn.school.demo.R

class ReadFragment : Fragment() {

    companion object {
        fun newInstance() = ReadFragment()
    }

    private lateinit var viewModel: ReadViewModel

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        MyApplication.systemBarSetting(MyApplication.DARK,requireActivity())
        return inflater.inflate(R.layout.fragment_read, container, false)
    }

    override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)
        viewModel = ViewModelProvider(this).get(ReadViewModel::class.java)
        // TODO: Use the ViewModel
    }

}